/* 
 * Copyright 2008 Rodrigo Reyes <reyes.rr at gmail dot com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you
 * may not use this file except in compliance with the License. You may
 * obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied. See the License for the specific language governing
 * permissions and limitations under the License.
**/
package net.kornr.abstractcanvas.client;

/**
 * The ICanvasExt interface extends the ICanvas interface to add text support.
 * Because there is no way to obtain the metrics of a string without the DOM element
 * being attached to the window, we need to inverse the drawing control, that's why
 * the addController() and removeController() methods were added.
 * <p>
 * If you need the measureText() methods, then you have to put all your drawing code
 * in a class implementing CanvasController, and let the ICanvasExt implementing 
 * class call back the CanvasController, once the canvas is attached.
 * <p>
 * If you don't need the measureText() methods, or if you only want to use the 
 * AWT implementation, you can just draw directly to the canvas.
 * 
 * @author Rodrigo Reyes
 *
 */
public interface ICanvasExt extends ICanvas, CanvasTextSupport
{
	public void addCanvasPainter(CanvasPainter controller);
	public void removeCanvasPainter(CanvasPainter controller);
}
